﻿using DevExpress.XtraSplashScreen;
using DevExpress.XtraWaitForm;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraSplashScreen;
using DevExpress.XtraWaitForm;
namespace UploadFile
{
    public partial class FrmProgressBar : WaitForm
    { 
        public FrmProgressBar()
        {
            InitializeComponent();
            this.progressPanel1.AutoHeight = true;
        }

        #region Overrides

        public override void SetCaption(string caption)
        {
            base.SetCaption(caption);
            this.progressPanel1.Caption = caption;
        }
        public override void SetDescription(string description)
        {
            base.SetDescription(description);
            this.progressPanel1.Description = description;
        }
        public override void ProcessCommand(Enum cmd, object arg)
        {
            base.ProcessCommand(cmd, arg);
        }
        public void ShowMe(Form owner, string description, string caption)
        {
            SplashScreenManager.ShowForm(owner, typeof(FrmProgressBar), true, true, false);
            SplashScreenManager.Default.SetWaitFormDescription(description);//描述
            SplashScreenManager.Default.SetWaitFormCaption(caption);//标题    
        }


        public void ShowMe(Form owner)
        {
            SplashScreenManager.ShowForm(owner, typeof(FrmProgressBar), true, true, false);
        }

        public void HideMe(Form owner)
        {
            SplashScreenManager.CloseForm(false, 0, owner);
        }
        #endregion

        public enum WaitFormCommand
        {
        }
         
        
    }
}
